import { createRouter, createWebHashHistory } from "vue-router"

const router = createRouter({
	history: createWebHashHistory(),
	routes: [
		{
			path: "/",
			name: "firstIndex",
			redirect: "login"
		},
		{
			path: "/login",
			name: "login",
			component: () => import("../views/login.vue")
		},
		{
			path: "/index",
			name: "index",
			redirect: "home",
			component: () => import("../views/index.vue"),
			children: [
				{
					path: "/home",
					name: "home",
					component: () => import("../views/home.vue")
				},
				{
					path: "/shadow",
					name: "光影常德",
					component: () => import("../views/shadow/index.vue")
				},
				{
					path: "/yzll",
					name: "沅芷澧兰",
					component: () => import("../views/yzll/index.vue")
				},
				{
					path: "/ldmx",
					name: "历代名贤",
					component: () => import("../views/ldmx/index.vue")
				}
			]
		}
	]
})

export default router
